package com.ssyx.sys.controller;

import com.ssyx.common.result.Result;
import com.ssyx.model.sys.Ware;
import com.ssyx.sys.service.WareService;
import io.swagger.v3.oas.annotations.Operation;
import io.swagger.v3.oas.annotations.tags.Tag;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;

import java.util.List;

/**
 * ClassName:WareController
 * Description:
 *
 * @Author kay
 * @Create 2024/4/26 16:17
 * @Version 1.0
 */
@Tag(name = "仓库管理")
@RestController
@RequestMapping("/admin/sys/ware")
//@CrossOrigin
public class WareController {

    @Autowired
    private WareService wareService;

    @Operation(summary = "所有仓库列表")
    @GetMapping("findAllList")
    public Result findAllList() {
        List<Ware> wareList = wareService.list();
        return Result.ok(wareList);
    }

}
